<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #d1 {
        width: 100px;
        height: 100px;
        background-color: pink;
        border: solid 1px black;
        margin: 20px;
        padding: 20px;
        /* 背景裁切 */
        /* 宽高默认是内容核的宽高 */
        background-clip: content-box;
        /* 设置元素宽高计算方式 默认内容核计算 */
        /* border-box q宽高就是边框会压缩内容 */
        box-sizing: border-box;
      }
    </style>
  </head>
  <body>
    <div id="d1">
      你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好
    </div>
  </body>
</html>
